package command;

import model.Perspective;

public class ZoomInCommand implements ICommand {
	
	private Perspective perspective;
	private double value;
	
	public ZoomInCommand(Perspective perspective, double value) {
		this.perspective = perspective;
		this.value = value;
	}
	
	@Override
	public void execute() {
		updatexValue();
	}
	
	private void updatexValue() {
		perspective.updateZoomPercentage(value);
	}

	@Override
	public void undo() {
		perspective.updateZoomPercentage(-value);
	}
	
}